index.js ➔ createStore   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 12
nc 1
nop 1
dl 0
loc 17
c 0
b 0
f 0
cc 1
rs 9.8
1
import Vue from 'vue'
2
import Vuex from 'vuex'
3
4
import { createActions } from './actions'
5
import mutations from './mutations'
6
7
Vue.use(Vuex)
8
9
export function createStore(route) {
10
  const actions = createActions(route)
11
12
  return new Vuex.Store({
13
    state: {
14
      counters: {
15
        newPostsCount: 0,
16
        pendingPostsCount: 0,
17
        publishedPostsCount: 0,
18
        activeUsersCount: 0,
19
        formSubmissionsCount: 0
20
      }
21
    },
22
    actions,
23
    mutations
24
  })
25
}
26